Keir Fraser [Tue, 28 Oct 2008 10:35:15 +0000 (10:35 +0000)]
xenoprof: Small fixes.
Signed-off-by: Ronghui Duan <ronghui.duan@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 18:51:52 +0000 (18:51 +0000)]
minios: do not expose #define current to applications
Currently the minios headers do this:
#define current get_current()
Obviously when porting general code to this environment, this can
cause problems !
The attached patch arranges for this only to be done if
#define __MINIOS__
is declared, which is set up by the makefile in extras/mini-os.
Suppressing the namespace pollution is necessary to get recent
upstream qemu's to compile, since they (quite properly) use `current'
as an ordinary identifier.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Mon, 27 Oct 2008 14:59:01 +0000 (14:59 +0000)]
x86: Disable MSI IRQs until locking is fixed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 13:31:15 +0000 (13:31 +0000)]
x86, hvm, xenoprof: Add fully support of HVM guest to xenoprofile on Intel P6.
Signed-off-by: Ronghui Duan <ronghui.duan@intel.com>
Keir Fraser [Mon, 27 Oct 2008 13:29:35 +0000 (13:29 +0000)]
x86: highmem handling assistance hypercalls
While looking at the origin of very frequently executed hypercalls I
realized that the high page accessor functions in Linux would be good
candidates to handle in the hypervisor - clearing or copying to/from
a high page is a pretty frequent operation (provided there's enough
memory in the domain). While prior to the first submission I only
measured kernel builds (where the results are not hinting at a
meaningful improvement), I now found time to do a more specific
analysis: page clearing is being improved by about 20%, page copying
doesn't seem to significantly benefit (though that may be an effect of
the simplistic copy_page() implementation Xen currently uses) -
nevertheless I would think that if one function is supported by the
hypervisor, then the other should also be.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 27 Oct 2008 13:27:33 +0000 (13:27 +0000)]
Constify arguments to unmap_domain_page() etc.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 27 Oct 2008 13:26:50 +0000 (13:26 +0000)]
x86: First fixmap entry (0) is invalid.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 13:23:58 +0000 (13:23 +0000)]
Print d->is_dying when dumping domain info.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 27 Oct 2008 13:22:43 +0000 (13:22 +0000)]
x86: fix domain cleanup
The preemptable page type handling changes modified free_page_type()
behavior without adjusting the call site in relinquish_memory(): Any
type reference left pending when leaving hypercall handlers is
associated with a page reference, and when successful free_page_type()
decrements the type refcount - hence relinquish_memory() must now also
drop the page reference.
Also, the recursion avoidance during domain shutdown somehow (probably
by me when I merged the patch up to a newer snapshot) got screwed up:
The avoidance logic in mm.c should short circuit levels below the top
one currently being processed, rather than the top one itself.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 27 Oct 2008 13:20:52 +0000 (13:20 +0000)]
x86/powernow: fix machine shutdown
cpufreq_del_cpu() calls cpufreq_driver->exit() without checking
whether an exit() handler is present, and by adding an exit() handler
to powernow we can at once close the potential memory leak.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 27 Oct 2008 11:56:57 +0000 (11:56 +0000)]
x86: Fix coding style in msi.c
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 11:27:31 +0000 (11:27 +0000)]
serial: Fix IRQ enable/disable in tx interrupt handler.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 10:49:20 +0000 (10:49 +0000)]
x86_32: Lock in map_domain_page() may be taken with IRQs disabled, and
hence must *always* disable IRQs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 10:29:39 +0000 (10:29 +0000)]
Add 2 more permissions to the XSM/Flask default policy.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Keir Fraser [Mon, 27 Oct 2008 10:08:48 +0000 (10:08 +0000)]
x86: relax restrictions on reserved bits in L3 for 32on64 x86 guests
A 32on64 guest cannot copy an existing pinned L3 entry to use as a new
L3 because COMPAT_L3_DISALLOW_MASK contains bits which are added to L3
entries by adjust_guest_l3e (U/S & R/W) or by the hardware (A & D).
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Mon, 27 Oct 2008 10:06:58 +0000 (10:06 +0000)]
Cpufreq statistic update for SW_ANY coordination
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Mon, 27 Oct 2008 10:03:17 +0000 (10:03 +0000)]
Fix xm scsi-attach/detach/list for inactive managed domains
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Thu, 23 Oct 2008 14:38:52 +0000 (15:38 +0100)]
x86: Enable spinlock debugging earlier during boot.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 14:38:27 +0000 (15:38 +0100)]
x86: Dom0 builder doesn't need to disable IRQs while running on dom0 pagetables.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 14:34:27 +0000 (15:34 +0100)]
x86: Dom0 builder must run on a valid GDT at all times.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 14:23:15 +0000 (15:23 +0100)]
Remove accidentally checked-in xenpmd binary.
Keir Fraser [Thu, 23 Oct 2008 11:01:03 +0000 (12:01 +0100)]
hpet cpuidle: Observe IRQ-safe locking protocol.
Otherwise, may encounter deadlock.
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 10:53:52 +0000 (11:53 +0100)]
spinlock: Add debug-build checks for IRQ-safe spinlocks.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 10:40:59 +0000 (11:40 +0100)]
x86, hvm: Move return-to-guest timer and interrupt cranking logic
outside of IRQ-safe context. This allows us to safely take
non-IRQ-safe spinlocks.
The drawback is that {vmx,svm}_intr_assist() now races new event
notifications delivered by IRQ or IPI. We close down this race by
having vcpu_kick() send a dummy softirq -- this gets picked up in
IRQ-sage context and will cause retry of *_intr_assist(). We avoid
delivering the softirq where possible by avoiding it when we are
running in the non-IRQ context of the VCPU to be kicked.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 10:20:44 +0000 (11:20 +0100)]
xenpmd: Fix makefile for 'make install'.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 23 Oct 2008 10:18:34 +0000 (11:18 +0100)]
hvmloader: Remove unneeded legacy flag from FADT flags field.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
rHG: changed tools/firmware/hvmloader/acpi/static_tables.c
Keir Fraser [Thu, 23 Oct 2008 10:17:25 +0000 (11:17 +0100)]
Xen power management daemon patch.
Signed-off-by: Kamala Narasimhan <kamala.narasimhan@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 15:47:44 +0000 (16:47 +0100)]
x86, smpboot: A few code cleanups.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 15:41:33 +0000 (16:41 +0100)]
Remove duplicated __cacheline_aligned attribute from irq_desc arrays
Remove duplicated __cacheline_aligned attribute, as it's
already included in type declaration.
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Keir Fraser [Wed, 22 Oct 2008 15:39:37 +0000 (16:39 +0100)]
Remove unused old xmalloc.c file.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 14:11:54 +0000 (15:11 +0100)]
x86: Remove needless IRQ critical section from init_xen_time().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 14:07:30 +0000 (15:07 +0100)]
spinlock: Add assertions for lock_irq() variants.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 14:06:01 +0000 (15:06 +0100)]
Define spin_barrier_irq() for IRQ-safe spinlocks, and use it for virq_lock.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 11:08:16 +0000 (12:08 +0100)]
x86, hvm: Allow 100us periodic virtual timers
Adjust vpt and hpet minimum period (for timers) from 900us to 100us to
be able to pass Windows 2008 compatibility tests.
Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 11:04:32 +0000 (12:04 +0100)]
Port HPET device model to vpt timer subsystem
The current hpet implementation runs a one-shot xen timer for each
hpet timer whenever the main counter is enabled regardless of whether
or not the individual hpet timers are enabled. When the timer fires,
if it is enabled the interrupt is routed to the guest. If the hpet
timer is periodic, a new one-shot timer is set, for NOW()+period.
There are a number of problems with this the most significant is guest
time drift. Windows does not read the hardware clock to verify time,
it depends on timer interrupts firing at the expected interval. The
existing implementation queues a new one-shot timer each time it fires
and does not allow for a difference between NOW() and the time the
timer was expected to fire, causing drift. Also there is
no allowance for lost ticks. This modification changes HPET to use the
Virtual Platform Timer (VPT) and, for periodic timers, to use periodic
timers. The VPT ensures an interrupt is delivered to the guest for
each period that elapses, plus, its use of xen periodic timers ensures
no drift.
Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 10:59:19 +0000 (11:59 +0100)]
EPT: tidy exception handler to give more useful errors
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 10:58:20 +0000 (11:58 +0100)]
x86, hap: Track max_mapped_pfn better when using 2MB p2m mappings.
The test for when to increase it was not quite right; also on EPT
the value it was set to didn't count the top 511 frames.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Wed, 22 Oct 2008 10:56:44 +0000 (11:56 +0100)]
Fix guest_physmap_add_entry sanity checking logic
Fix the logic of the p->m and m->p mapping sanity checks and fixup in
guest_physmap_add_entry().
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Keir Fraser [Wed, 22 Oct 2008 10:55:33 +0000 (11:55 +0100)]
blktap: re-enable O_DIRECT in block_qcow.c
Turns out that only two reads and writes in block-qcow.c need to be
fixed to work correctly with O_DIRECT.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Wed, 22 Oct 2008 10:53:51 +0000 (11:53 +0100)]
Simplify set_px_info hypercall 32-on-64 compatibility shim.
Mark processor_px as 'checking' and translate handle to simplify
actual code doing in the translation.
(According to Jan Beulich's suggestion)
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Isaku Yamahata [Wed, 22 Oct 2008 08:20:15 +0000 (17:20 +0900)]
[IA64] Add head files and helper functions for VTD/ia64
Add head files and helper functions for VTD/ia64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Wed, 22 Oct 2008 03:41:52 +0000 (12:41 +0900)]
[IA64]: update ia64 px info transfer corresponding to x86 px info update.
update ia64 px info transfer corresponding to x86 px info update.
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Isaku Yamahata [Wed, 22 Oct 2008 03:40:06 +0000 (12:40 +0900)]
[IA64] Add hypercalls needed for VTD
Add hypercalls needed for VTD.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Wed, 22 Oct 2008 02:46:55 +0000 (11:46 +0900)]
merge with xen-unstable.hg
Isaku Yamahata [Wed, 22 Oct 2008 02:38:22 +0000 (11:38 +0900)]
[IA64] fix compilation error of xen/common/spinlock.c
This patch fixes the error in the x86 tree.
> spinlock.c: In function _spin_lock_recursive:
> spinlock.c:59: error: dereferencing pointer to incomplete type
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Tue, 21 Oct 2008 17:00:21 +0000 (18:00 +0100)]
ia64: Some fixes after spinlock implementation changes.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 13:15:11 +0000 (14:15 +0100)]
x86, shadow: shadow_page_info must be same size as page_info.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 13:14:37 +0000 (14:14 +0100)]
x86: Move some code out of IRQ-disabled section of context switch path.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 13:13:54 +0000 (14:13 +0100)]
x86, irq: No synamic memory allocation with IRQs disabled.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 10:44:39 +0000 (11:44 +0100)]
Use hvm_dirq_assist() to replace {vmx,svm}_dirq_assist().
Do not compile some IA64 MSI-related parts.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 21 Oct 2008 10:43:21 +0000 (11:43 +0100)]
xend: Fix and clean up vscsi_util.py and other files
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Keir Fraser [Tue, 21 Oct 2008 10:39:57 +0000 (11:39 +0100)]
timer: No dynamic memory allocation with IRQs disabled.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 10:39:22 +0000 (11:39 +0100)]
x86: Avoid dynamic memory allocation during AP startup.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 09:04:40 +0000 (10:04 +0100)]
pv-on-hvm: Avoid rwlock livelock on save/restore.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 21 Oct 2008 08:53:34 +0000 (09:53 +0100)]
Fix ioapic_rte_to_remap_entry() on IA64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Tue, 21 Oct 2008 08:49:19 +0000 (09:49 +0100)]
Add print info for ACPI _PCT and _PPC
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Tue, 21 Oct 2008 08:48:56 +0000 (09:48 +0100)]
Update cpufreq statistic protection
For struct pm_px, there are 3 pointer: pxpt, pt, trans_pt.
Partly free pointer 'pt' and 'trans_pt' will result in little memory
leak, and what is more, will result in protection issue when user
access px statistic info through libxc.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Keir Fraser [Tue, 21 Oct 2008 08:48:08 +0000 (09:48 +0100)]
Add protection for xenpm access power management info
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Tue, 21 Oct 2008 08:47:33 +0000 (09:47 +0100)]
x86: Adapt 32b guest os to 64b hypervisor platform_hypercall compatibility
Changeset 18552 (
19b0a4f91712) move px transfer logic from
platform_hypercall.c to a common file to support both x86 and
ia64. However, it involves 32b guest os to 64b hypervisor (x86)
compatible issue. This patch fix the compatible issue, and make
set_px_pminfo() re-used by ia64 and x86 (32b guest os to 64b
hypervisor, and 64b guest os to 64b hypervisor).
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Keir Fraser [Mon, 20 Oct 2008 16:45:36 +0000 (17:45 +0100)]
x86, spinlock: Always inline raw spinlock functions.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 16:17:55 +0000 (17:17 +0100)]
x86, spinlock: Get rid of .text.lock out-of-line section.
We don't care about code bloat now that spinlock operations are not
inlined into callers. This will make backtraces easier to read.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 16:16:45 +0000 (17:16 +0100)]
spinlock: Modify recursive spinlock definitions to support up to 4095 CPUs.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 15:49:25 +0000 (16:49 +0100)]
x86: Add TLB flushing to HAP p2m changes
Removing an MFN from the p2m requires it to be flushed from the
guest's TLBs on HAP, like we do when we're using shadows.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 15:48:17 +0000 (16:48 +0100)]
Clean up spinlock operations and compile as first-class functions.
This follows modern Linux, since apparently outlining spinlock
operations does not slow down execution. The cleanups will also allow
more convenient addition of diagnostic code.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:31:54 +0000 (15:31 +0100)]
vmx: avoid taking locks with irqs disabled
Shuffle the bits of the vmexit handler that run with EFLAGS.IF == 0 up
to the top. Otherwise we end up calling spin_lock() with interrupts
disabled, which can deadlock against the time-synchronization
rendezvous code.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:22:58 +0000 (15:22 +0100)]
x86: add movnti emulation
Linux added the use of movnti for copying from user to kernel space in
certain cases, and as per reports we got this may happen with the
destination being in MMIO.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 20 Oct 2008 14:19:39 +0000 (15:19 +0100)]
VT-d: correct allocation failure checks
Checking the return value of map_domain_page() (and hence
map_vtd_domain_page()) against NULL is pointless, checking the return
value of alloc_domheap_page() (and thus alloc_pgtable_maddr()) is
mandatory, however.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Mon, 20 Oct 2008 14:18:09 +0000 (15:18 +0100)]
docs: Update XenAPI document for pvSCSI
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Keir Fraser [Mon, 20 Oct 2008 14:17:24 +0000 (15:17 +0100)]
xend: fix setting vcpus > VCPUs_max
From reading xend code related to changing number of vcpus it appears
setting the number of vcpus to a value greater than VCPUs_max is not
allowed on a running domain. This restriction is not honored by
setVCpuCount() in XendDomainInfo.py. Attached patch makes
setVCpuCount() fail if vcpus > VCPUs_max and domain is running.
Also, I think the changes should be reflected in managed config of
running domain if in fact the domain is managed - so unconditionally
call managed_config_save().
BTW, the original code is rather confusing. Essentially the same
actions are taken regardless if self.info['VCPUs_max'] > vcpus, just
the order of invocation is changed. But this doesn't seem to matter
since self.info['VCPUs_live'] is not subsequently used.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Mon, 20 Oct 2008 14:15:19 +0000 (15:15 +0100)]
Add some necessary files to build IA64 VT-d.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:14:55 +0000 (15:14 +0100)]
vtd: make the xen_in_range/tboot_in_range checkings also work for IA64.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:13:50 +0000 (15:13 +0100)]
Define a macro IO_APIC_ID() for x86.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:13:02 +0000 (15:13 +0100)]
iommu: make some functions (mainly MSI-related) dummy on IA64 for now.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:11:41 +0000 (15:11 +0100)]
Add a new file xen/include/xen/hvm/irq.h to share common definitions.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Keir Fraser [Mon, 20 Oct 2008 14:11:19 +0000 (15:11 +0100)]
NMI watchdog: don't try to run too slow.
The way MSR writes of performance counters works means that Intel
CPUs running faster than about 2.1GHz can't set the NMI timer to 1Hz.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:08:24 +0000 (15:08 +0100)]
blktap: Handle qcow backing files correctly.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Keir Fraser [Mon, 20 Oct 2008 14:05:48 +0000 (15:05 +0100)]
xend: Stub out vscsi_get_scsidevices() until issues are addressed.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 13:15:37 +0000 (14:15 +0100)]
NMI watchdog: use new counter on Core/Core2 CPUs
The old CPU_CLK_UNHALTED performance counter no longer runs on Core or
Core2 CPUs. Use the new CPU_CLK_UNHALTED.CORE_P one.
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 11:12:50 +0000 (12:12 +0100)]
svm: Check exitcode for NRIP validity only in debug builds.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Fri, 17 Oct 2008 11:04:11 +0000 (12:04 +0100)]
vtd: code cleanup
Remove iommu_page_mapping/unmapping, which are redundant because
intel_iommu_map_page/unmap_page can handle their functions.
Correct IRTA_REG_EIMI_SHIFT to IRTA_REG_EIME_SHIFT.
and also remove useless declarations in iommu.c
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Fri, 17 Oct 2008 11:00:25 +0000 (12:00 +0100)]
Enable PCI serial devices for console messages
The basic issue is that some PCI serial devices use a non-standard
crystal to control the baud rate divisor. This patch enhances the
`com' parameter to enable you to specify the crystal frequency used by
the serial device. Since this parameter already allows you to specify
I/O address and IRQ this is all that is needed to get a PCI serial
device to work. With this patch the `com' parameter is now defined
as:
comN=BBB[/CCC][,NPS[,III[,IRQ]]]
Where `CCC' is the crystal frequency. Note that if you specify 0 for
`IRQ' Xen will run the serial device in polled mode, obviating the
need for interrupts (an advantage since this is the only way I was
able to get my PCI serial device to work).
As an example, I am using the xen boot command:
kernel /xen.gz com1=
3D115200,8n1,0xe880/921600,0
console=3Dcom1
Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Isaku Yamahata [Fri, 17 Oct 2008 09:24:57 +0000 (18:24 +0900)]
[IA64] clean up of xenpage.h
remove nasty undefs in xenpage.h.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 17 Oct 2008 09:16:05 +0000 (18:16 +0900)]
[IA64] clean up ioports_{permit, deny}_access()
eliminate code duplication in those functions
by introducing helper functions.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Fri, 17 Oct 2008 08:40:15 +0000 (17:40 +0900)]
[IA64] Change ioports_permit_access interface().
use VTD to assing device, guest port may not be equal to host port.
Change ioports_permit_access interface to get guest pseudo physical
address.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Isaku Yamahata [Fri, 17 Oct 2008 06:33:03 +0000 (15:33 +0900)]
[IA64] make virt_to_maddr() to support both cached/uncached identity mapped area.
The significant 8 bits of va are used by Xen,
such as 0xf2 is used as uncache mapping.
In function ioports_permit_access,
mach_start = mmio_start | __pa(space->mmio_base);
Mach_start gets wrong physical address.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Keir Fraser [Thu, 16 Oct 2008 17:45:48 +0000 (18:45 +0100)]
NextRIPS support for forthcoming AMD processors
Future versions of AMD processors will support a feature called
NextRIPS or Next RIP Save. This feature causes the processor
to store the next sequential RIP of a guest in the VMCB on
most instruction interrupts. The hypervisor can use this
information to determine how much memory to read to determine
the intercepted instruction, modestly improving performance.
The following patch implements support for this feature.
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Keir Fraser [Thu, 16 Oct 2008 17:36:43 +0000 (18:36 +0100)]
Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery.
Race found by Jan Beulich.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 14:46:04 +0000 (15:46 +0100)]
xmalloc: Add pooled allocator interface.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 10:09:50 +0000 (11:09 +0100)]
xmalloc: use tlsf algorithm
This patch replaces the Xen xmalloc engine with tlsf, an allocation
engine that is both more space efficient and time-bounded, especially
for allocation sizes between PAGE_SIZE/2 and PAGE_SIZE.
The file xmalloc.c is deprecated but not yet deleted. A simple
changein common/Makefile will change back to the legacy xmalloc/xfree
if needed for testing.
Code adapted from Nitin Gupta's tlsf-kmod, rev 229, found here:
http://code.google.com/p/compcache/source/browse/trunk/sub-projects/allocat=
ors/tlsf-kmod
with description and performance details here:
http://code.google.com/p/compcache/wiki/TLSFAllocator
(new Xen code uses 4K=3DPAGE_SIZE for the region size)
For detailed info on tlsf, see:
http://rtportal.upv.es/rtmalloc/
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Thu, 16 Oct 2008 08:52:40 +0000 (09:52 +0100)]
vmx: set DR7 via DOMCTL_setvcpucontext
This patch is needed for a guest domain debugger
to support hardware watchpoint.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Keir Fraser [Thu, 16 Oct 2008 08:51:42 +0000 (09:51 +0100)]
xentrace: trace power management events.
Signed-off-by: Guanqun Lu <guanqun.lu@intel.com>
Keir Fraser [Thu, 16 Oct 2008 08:50:18 +0000 (09:50 +0100)]
Enhance XenAPI for pvSCSI
Basically, I implemented XenAPI for pvSCSI according to the patch of
XenAPI document which I sent before. However, I renamed the class
name of virtual SCSI devices to "DSCSI".
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Isaku Yamahata [Thu, 16 Oct 2008 02:33:05 +0000 (11:33 +0900)]
[IA64] rename struct viosapic_rte in order to share VTD code.
VTD code uses vioapic_redir_entry structure,
This patch lets viosapci.h use the same structure name and some fields.
That IA64 can use the same VTD code with ia32
Signed-off-by: Anthony xu <anthony.xu@intel.com>
Isaku Yamahata [Thu, 16 Oct 2008 02:33:05 +0000 (11:33 +0900)]
[IA64] avoid name conflict with pci_dev.
VTD introduces a new pci_dev structure which is conflict with that defined in
xen/include/asm-ia64/linux-xen/linux/linux-pci.h.
the pci_dev defined in linux-pci.h is only used by sn platform.
So change pci_dev to sn_pci_dev.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Keir Fraser [Wed, 15 Oct 2008 14:58:09 +0000 (15:58 +0100)]
x86 cpuid: leaf 4 sub-index goes in %ecx, not %ebx
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Keir Fraser [Wed, 15 Oct 2008 14:57:20 +0000 (15:57 +0100)]
amd: fix CPUID mask option handling
c/s 18402 added command line options to AMD-specific code duplicating
ones already existing in Intel code. The generic command line parser
didn't support this scenario for integer options, however.
Additionally, the options added were using the same option string for
two different purposes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Keir Fraser [Wed, 15 Oct 2008 14:56:26 +0000 (15:56 +0100)]
x86: make injection of spurious page faults configurable per domain
Some distro kernels do not handle spurious page faults so allow these
to be supressed on a per VM basis.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Keir Fraser [Wed, 15 Oct 2008 10:58:15 +0000 (11:58 +0100)]
vt-d: Fix MSI-x interrupt remapping
MSI-x may have multiple vectors, however in current interrupt
remapping code, one device only has one entry in interrupt remapping
table.
This patch adds 'remap_index' in msi_desc structure to track its index
in interrupt remapping table.
Signed-off-by: Haitao Shan <haitao.shan@intel.com>
Signed-off-by: Weidong Han <weidong.han@intel.com>
Keir Fraser [Wed, 15 Oct 2008 07:22:42 +0000 (08:22 +0100)]
x86: Fix non-debug build.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Keir Fraser [Tue, 14 Oct 2008 18:19:48 +0000 (19:19 +0100)]
x86_emulate: Fix after decode changes. Valid opcode decode values must
be non-zero.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>